//Eg8-5.cpp
#include<iostream>
using namespace std;
void Errhandler(int n)throw(int,char,double)
{
    if(n==1)  throw n;
    if(n==2)  throw 'x';
    if(n==3)  throw 1.1;
}
void main()
{
    cout<<"Before Errhander..."<<endl;
    try
	{
        Errhandler(1);
    }
    catch(int i)
	{ 
		cout<<"catch an integer..."<<endl;
	}
    catch(char c)
	{
		cout<<"catch an char..."<<endl;
	}
    catch(double d)
	{
		cout<<"catch an double..."<<endl;
	}
}


